SQLite3 模組
import sqlite3
conn = sqlite3.connect("test2.sqlite")
sqlstr = 'CREATE TABLE IF NOT EXISTS table01
("num" INTEGER PRIMARY KEY NOT NULL, "tel" TEXT)'
conn.execute(sqlstr)
sqlstr = 'INSERT INTO table01 VALUES(1,"02-1234567")'
conn.execute(sqlstr)
sqlstr = '''INSERT INTO table01(num, tel)
VALUES(2,"03-2345678"),(3,"04-3456789")'''
conn.execute(sqlstr)
conn.commit() # 主動更新
conn.close() # 關閉資料庫連線